<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<button type="button" onclick="beginaction()">开始</button>
	</body>
	<script type="text/javascript">
		var imgindex=1;
		function setimg(){
			var url='img/list/'+imgindex+'.jpg';
			document.getElementById('imgid').src=url;
		}
		onload=function(){
			setimg();
		}
		function beginaction(){
			setInterval(function(){
				imgindex++;
				if(imgindex>9){
					imgindex=1;
				}
				setimg();
			},500)
		}
	</script>
</html>
